using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._UtilityNetworkTools._Administration
{
    /// <summary>
    /// <para>Set Network Attribute</para>
    /// <para>Assigns a network attribute to a feature class or table at the asset type level to be used during tracing operations.</para>
    /// <para>在资产类型级别为要素类或表分配网络属性，以便在追踪操作期间使用。</para>
    /// </summary>    
    [DisplayName("Set Network Attribute")]
    public class SetNetworkAttribute : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public SetNetworkAttribute()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_utility_network">
        /// <para>Input Utility Network</para>
        /// <para>The utility network that contains the network attribute to set.</para>
        /// <para>包含要设置的网络属性的公共设施网络。</para>
        /// </param>
        /// <param name="_network_attribute">
        /// <para>Network Attribute</para>
        /// <para>The network attribute to be assigned to the field in the feature class or table.</para>
        /// <para>要分配给要素类或表中的字段的网络属性。</para>
        /// </param>
        /// <param name="_domain_network">
        /// <para>Domain Network</para>
        /// <para>The domain network that contains the feature class or table that will have a network attribute set on it.</para>
        /// <para>包含将设置网络属性的要素类或表的域网络。</para>
        /// </param>
        /// <param name="_featureclass">
        /// <para>Input Table</para>
        /// <para>The input feature class or table that contains the field that will be used to set the network attribute.</para>
        /// <para>输入要素类或表，其中包含将用于设置网络属性的字段。</para>
        /// </param>
        /// <param name="_field">
        /// <para>Field</para>
        /// <para>An existing field that will be assigned the network attribute. The field data type must match the data type of the network attribute. For example, if the network attribute is a short integer type, the field must also be a short integer type. Network attributes that do not support nulls can only be assigned to fields that do not allow null values.</para>
        /// <para>将分配网络属性的现有字段。字段数据类型必须与网络属性的数据类型匹配。例如，如果网络属性是短整数类型，则该字段也必须是短整数类型。不支持 null 的网络属性只能分配给不允许 null 值的字段。</para>
        /// </param>
        public SetNetworkAttribute(object _in_utility_network, object _network_attribute, object _domain_network, object _featureclass, object _field)
        {
            this._in_utility_network = _in_utility_network;
            this._network_attribute = _network_attribute;
            this._domain_network = _domain_network;
            this._featureclass = _featureclass;
            this._field = _field;
        }
        public override string ToolboxName => "Utility Network Tools";

        public override string ToolName => "Set Network Attribute";

        public override string CallName => "un.SetNetworkAttribute";

        public override List<string> AcceptEnvironments => ["workspace"];

        public override object[] ParameterInfo => [_in_utility_network, _network_attribute, _domain_network, _featureclass, _field, _out_utility_network];

        /// <summary>
        /// <para>Input Utility Network</para>
        /// <para>The utility network that contains the network attribute to set.</para>
        /// <para>包含要设置的网络属性的公共设施网络。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Utility Network")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_utility_network { get; set; }


        /// <summary>
        /// <para>Network Attribute</para>
        /// <para>The network attribute to be assigned to the field in the feature class or table.</para>
        /// <para>要分配给要素类或表中的字段的网络属性。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Network Attribute")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _network_attribute { get; set; }


        /// <summary>
        /// <para>Domain Network</para>
        /// <para>The domain network that contains the feature class or table that will have a network attribute set on it.</para>
        /// <para>包含将设置网络属性的要素类或表的域网络。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Domain Network")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _domain_network { get; set; }


        /// <summary>
        /// <para>Input Table</para>
        /// <para>The input feature class or table that contains the field that will be used to set the network attribute.</para>
        /// <para>输入要素类或表，其中包含将用于设置网络属性的字段。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Table")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _featureclass { get; set; }


        /// <summary>
        /// <para>Field</para>
        /// <para>An existing field that will be assigned the network attribute. The field data type must match the data type of the network attribute. For example, if the network attribute is a short integer type, the field must also be a short integer type. Network attributes that do not support nulls can only be assigned to fields that do not allow null values.</para>
        /// <para>将分配网络属性的现有字段。字段数据类型必须与网络属性的数据类型匹配。例如，如果网络属性是短整数类型，则该字段也必须是短整数类型。不支持 null 的网络属性只能分配给不允许 null 值的字段。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Field")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _field { get; set; }


        /// <summary>
        /// <para>Updated Utility Network</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Updated Utility Network")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public object _out_utility_network { get; set; }


        public SetNetworkAttribute SetEnv(object workspace = null)
        {
            base.SetEnv(workspace: workspace);
            return this;
        }

    }

}